import { defineConfig } from "@rslib/core";

export default defineConfig({
  source: {
    entry: {
      index: ["./rspack/loader/index.ts", "./rspack/loader/cjs.cts"],
    },
  },
  lib: [
    {
      dts: true,
      bundle: true,
      format: "esm",
      syntax: "es2022",
      banner: {
        js: "// @ts-nocheck",
      },
    },
    {
      output: {
        filename: {
          js: "cjs.js",
        },
      },
      dts: true,
      bundle: true,
      format: "cjs",
      syntax: "es2022",
      banner: {
        js: "// @ts-nocheck",
      },
    },
  ],
  output: {
    target: "node",
    distPath: {
      root: "./rspack/dist",
    },
  },
});
